Optimal. Leaf size=132 \[ -\frac {a \, _2F_1\left (\frac {1}{2},\frac {1-n}{2};\frac {3-n}{2};\cos ^2(e+f x)\right ) \sec ^{-1+n}(e+f x) \sin (e+f x)}{f (1-n) \sqrt {\sin ^2(e+f x)}}+\frac {a \, _2F_1\left (\frac {1}{2},-\frac {n}{2};\frac {2-n}{2};\cos ^2(e+f x)\right ) \sec ^n(e+f x) \sin (e+f x)}{f n \sqrt {\sin ^2(e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 132, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3872, 3857,
2722} \begin {gather*} \frac {a \sin (e+f x) \sec ^n(e+f x) \, _2F_1\left (\frac {1}{2},-\frac {n}{2};\frac {2-n}{2};\cos ^2(e+f x)\right )}{f n \sqrt {\sin ^2(e+f x)}}-\frac {a \sin (e+f x) \sec ^{n-1}(e+f x) \, _2F_1\left (\frac {1}{2},\frac {1-n}{2};\frac {3-n}{2};\cos ^2(e+f x)\right )}{f (1-n) \sqrt {\sin ^2(e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2722
Rule 3857
Rule 3872
Rubi steps
\begin {align*} \int \sec ^n(e+f x) (a+a \sec (e+f x)) \, dx &=a \int \sec ^n(e+f x) \, dx+a \int \sec ^{1+n}(e+f x) \, dx\\ &=\left (a \cos ^n(e+f x) \sec ^n(e+f x)\right ) \int \cos ^{-1-n}(e+f x) \, dx+\left (a \cos ^n(e+f x) \sec ^n(e+f x)\right ) \int \cos ^{-n}(e+f x) \, dx\\ &=-\frac {a \, _2F_1\left (\frac {1}{2},\frac {1-n}{2};\frac {3-n}{2};\cos ^2(e+f x)\right ) \sec ^{-1+n}(e+f x) \sin (e+f x)}{f (1-n) \sqrt {\sin ^2(e+f x)}}+\frac {a \, _2F_1\left (\frac {1}{2},-\frac {n}{2};\frac {2-n}{2};\cos ^2(e+f x)\right ) \sec ^n(e+f x) \sin (e+f x)}{f n \sqrt {\sin ^2(e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.17, size = 106, normalized size = 0.80 \begin {gather*} \frac {a \csc (e+f x) \sec ^{-1+n}(e+f x) \left ((1+n) \, _2F_1\left (\frac {1}{2},\frac {n}{2};\frac {2+n}{2};\sec ^2(e+f x)\right )+n \, _2F_1\left (\frac {1}{2},\frac {1+n}{2};\frac {3+n}{2};\sec ^2(e+f x)\right ) \sec (e+f x)\right ) \sqrt {-\tan ^2(e+f x)}}{f n (1+n)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.07, size = 0, normalized size = 0.00 \[\int \left (\sec ^{n}\left (f x +e \right )\right ) \left (a +a \sec \left (f x +e \right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a \left (\int \sec {\left (e + f x \right )} \sec ^{n}{\left (e + f x \right )}\, dx + \int \sec ^{n}{\left (e + f x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )\,{\left (\frac {1}{\cos \left (e+f\,x\right )}\right )}^n \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________